/*
 * @(#)MtmWfStepNotificationRule.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.bean;

import com.dcivision.framework.bean.AbstractBaseObject;

/**
 *MtmWfStepNotificationRule.java
 *
 * This class is the serializable bean reflecting business logic uses.
 * It represents a notification rules of a workflow step. For examples, a
 * rule to send email notification after task arrived for 5 minutes may 
 * have following values for the properties,
 * 
 * <pre>
 * notifyTrigger = {@link #NOTIFY_TRIGGER_TYPE_ARRIVED}
 * notifyAtField = {@link java.util.Calendar#MINUTE}
 * notifyAtAmt = 5 (task arrived for 5 mintues)
 * notifyAckMethod = {@link com.dcivision.alert.bean.UpdateAlert#EMAIL_NOTIFICATION},{@link com.dcivision.alert.bean.UpdateAlert#SYSTEM_NOTIFICATION}
 * </pre> 
 *  @author           Dick Xie
 *  @company          DCIVision Limited
 *  @creation date    07/12/2004
 *  @version          $Revision: 1.10.26.1 $
 *  @see MtmWorkflowProgressNotifyRule
 *  @see MtmWfStepNotificationTarget
 */

public class MtmWfStepNotificationRule extends AbstractBaseObject {
  
  public static final String REVISION = "$Revision: 1.10.26.1 $";
  static final long serialVersionUID = 4817609822916429036L;
  
  private Integer workflowStepID = null;
  private String notifyTrigger = null;
  private Integer notifyAtField = null;
  private Integer notifyAtAmt = null;
  private String notifyAckMethod = null;
  
  //  public static final String  NOTIFY_TRIGGER_TYPE_IN_PROGRESS = "I";//Task is in progress
  /** Trigger when the whole task is completed for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_COMPLETED = "C";//Task is completed
  
  /** Trigger when task is stopped for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_STOPPED = "S";//Workflow is stopped
  
  /** Trigger when task is arrived for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_ARRIVED = "A";//Task is Arrived
  
  /** Trigger when task is still pending for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_PENDING_FOR = "P";//Task is pending for
  
  /** Trigger when it is certain time before task due date*/
  public static final String  NOTIFY_TRIGGER_TYPE_BEFORE_DUE_DATE = "B";//Task is before due date
  
  /** Trigger when task is overdued for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_OVER_DUE_DATE = "O";//Task is over due date
  
  /** Trigger when task priority is changed for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_PRIORITY_CHANGED = "Z";//Task priority changed
  
  /** Trigger when task is checked out for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_CHECK_OUT_BY_USER = "I";//Task is check out by user
  
  /** Trigger when task is completed by a user for a certain time */
  public static final String  NOTIFY_TRIGGER_TYPE_COMPLETED_BY_USER = "M";//Task is completed by user
  
  
  /** Trigger when task is completed by a user select approved  */
  public static final String  NOTIFY_TRIGGER_TYPE_APPROVED = "V";
  
  /** Trigger when task is completed by a user select reject  */
  public static final String  NOTIFY_TRIGGER_TYPE_REJECT = "R";
  
  /** Trigger when task is completed by a user select yes  */
  public static final String  NOTIFY_TRIGGER_TYPE_YES = "Y";
  
  /** Trigger when task is completed by a user select reject  */
  public static final String  NOTIFY_TRIGGER_TYPE_NO = "N";
  
  /** Trigger when task is completed by a user select reject  */
  public static final String  NOTIFY_TRIGGER_TYPE_DECISION = "S";
  
  /** Notify by send mail  */
  public static final String  NOTIFY_ACK_METHOD_TYPE_EMAIL= "E";
  
  /** Notify by send system message */
  public static final String  NOTIFY_ACK_METHOD_TYPE_SYSTEM = "S";
  /**
   * Constructs a new instance 
   */
  public MtmWfStepNotificationRule() {
    super();
  }
  /**
   * @return Returns the workflowStepID.
   */
  public Integer getWorkflowStepID() {
    return(this.workflowStepID);
  }
  /**
   * @param workflowStepID The workflowStepID to set.
   */
  public void setWorkflowStepID(Integer workflowStepID) {
    this.workflowStepID = workflowStepID;
  }
  /**
   * @return Returns the notifyTrigger.
   */
  public String getNotifyTrigger() {
    return(this.notifyTrigger);
  }
  /**
   * @param notifyTrigger The notifyTrigger to set.
   */
  public void setNotifyTrigger(String notifyTrigger) {
    this.notifyTrigger = notifyTrigger;
  }
  /**
   * @return Returns the notifyAtField.
   * @see java.util.Calendar#DATE
   * @see java.util.Calendar#HOUR
   * @see java.util.Calendar#MINUTE
   */
  public Integer getNotifyAtField() {
    return(this.notifyAtField);
  }
  /**
   * @param notifyAtField The notifyAtField to set.
   * @see java.util.Calendar#DATE
   * @see java.util.Calendar#HOUR
   * @see java.util.Calendar#MINUTE
   */
  public void setNotifyAtField(Integer notifyAtField) {
    this.notifyAtField = notifyAtField;
  }
  /**
   * @return Returns the notifyAtAmt.
   */
  public Integer getNotifyAtAmt() {
    return(this.notifyAtAmt);
  }
  /**
   * @param notifyAtAmt The notifyAtAmt to set.
   */
  public void setNotifyAtAmt(Integer notifyAtAmt) {
    this.notifyAtAmt = notifyAtAmt;
  }
  /**
   * @return Returns the notifyAckMethod.
   * @see com.dcivision.alert.bean.UpdateAlert#EMAIL_NOTIFICATION
   * @see com.dcivision.alert.bean.UpdateAlert#SYSTEM_NOTIFICATION
   */
  public String getNotifyAckMethod() {
    return(this.notifyAckMethod);
  }
  /**
   * @param notifyAckMethod The notifyAckMethod to set.
   * @see com.dcivision.alert.bean.UpdateAlert#EMAIL_NOTIFICATION
   * @see com.dcivision.alert.bean.UpdateAlert#SYSTEM_NOTIFICATION
   */
  public void setNotifyAckMethod(String notifyAckMethod) {
    this.notifyAckMethod = notifyAckMethod;
  }
}
